#pragma once
#ifndef glapp_h_
#define glapp_h_


#include "../../inc/skyAdapter.h"
#include "../../inc/skyObject.h"

#ifdef _GLES_
#include "../thirdParty/win32/ogles/gles/gl.h"
#include "../thirdParty/win32/ogles/EGL/egl.h"
#include <windows.h>

namespace GL
{
	class GLContext
	{
	public:
		HWND	   m_hwnd;
		EGLDisplay m_eglDisplay;
		EGLContext m_eglContext;
		EGLSurface m_eglSurface;
		EGLConfig m_eglConfig[1];

	};
	GLContext* getContext();
	EGLSurface CreateRenderSurface(GLint w,GLint h,GLuint Format_ = EGL_TEXTURE_RGB);
	Sky::Void DestroyRenderSurface(EGLSurface surf);
	Sky::Bool BindTexImage(EGLSurface surf);
	Sky::Bool ReleaseTexImage(EGLSurface surf);
	Sky::Bool Present();
}
#endif
#endif